\mode<presentation>

\RequirePackage[many]{tcolorbox}

% Settings
\useinnertheme{sjtug}
\useoutertheme{sjtug}

\definecolor{sjtuPrimary}{HTML}{004098}
  
\definecolor{cardPrimary}{HTML}{009688}
\definecolor{cardShadow}{HTML}{000000}
\definecolor{BGgrey01}{HTML}{E0E0E0}
\definecolor{BGgrey02}{HTML}{FAFAFA}
\definecolor{BGgrey03}{HTML}{FFFFFF}

\setbeamercolor{structure}{fg=sjtuPrimary}
\usecolortheme{whale}

\usefonttheme[onlymath]{serif}
\setbeamercovered{transparent=5}

\setlength\leftmargini{1.4em}
\setlength\leftmarginii{1.4em}
\setlength\leftmarginiii{1.4em}
\setbeamersize{description width=0.24cm}

\newenvironment{card}{%
  \begin{tcolorbox}[colback=BGgrey03, colbacktitle=cardPrimary, %
                    enhanced, sharpish corners=all,%
                    fuzzy shadow={0mm}{ 0.9mm}{ 0.6mm}{0.2mm}{cardShadow!20!BGgrey02}, % top
                    fuzzy shadow={0mm}{-0.6mm}{-0.1mm}{0.2mm}{cardShadow!40!BGgrey02}, % bottomSmall
                    fuzzy shadow={0mm}{-0.2mm}{-0.2mm}{0.2mm}{cardShadow!20!BGgrey02}, % bottomBig
                    title filled, boxrule=0mm,
                    left=2mm, right=2mm, top=0mm, bottom=0mm, middle=1mm,
                    segmentation code={\path[draw=BGgrey01](segmentation.west) -- (segmentation.east);}]%
    }{%
  \end{tcolorbox}%
  }
\newenvironment{cardTitle}[1]{%
  \begin{tcolorbox}[colback=BGgrey03, colbacktitle=cardPrimary, %
                    enhanced, sharpish corners=all,%
                    fuzzy shadow={0mm}{ 0.9mm}{ 0.6mm}{0.2mm}{cardShadow!20!BGgrey02}, % top
                    fuzzy shadow={0mm}{-0.6mm}{-0.1mm}{0.2mm}{cardShadow!40!BGgrey02}, % bottomSmall
                    fuzzy shadow={0mm}{-0.2mm}{-0.2mm}{0.2mm}{cardShadow!20!BGgrey02}, % bottomBig
                    title filled, boxrule=0mm, title=#1,
                    left=2mm, right=2mm, top=2mm, bottom=2mm, middle=2mm, toptitle=2mm, bottomtitle=2mm,
                    segmentation code={\path[draw=BGgrey01](segmentation.west) -- (segmentation.east);}]%
    }{%
  \end{tcolorbox}%
  }

\mode<all>